<?php
class num{
    function Sum_Solution($n){
        for($i=1;$i<=$n;$i++){
            $nn[] = $i;
        }
        $m = array_sum($nn);
        echo $n<=1 ? 1 : $m;
    }
}
$data = new num;
print_r($data->Sum_Solution(5));
?>